Skip to content

Add init_worker_code for code that runs once per worker#85

Merged
maleadt merged 9 commits intoJuliaTesting:mainfrom
christiangnrd:initwrkr
Feb 6, 2026
Merged

Add init_worker_code for code that runs once per worker#85
maleadt merged 9 commits intoJuliaTesting:mainfrom
christiangnrd:initwrkr

Conversation

@christiangnrd
Copy link
Contributor

@christiangnrd christiangnrd commented Jan 28, 2026

The GPUArrays testsuite takes at least 3s to load. It saves a lot of time to only load it once per worker instead of once per test especially in the memory constrained runners that are 7-8GB Mac Minis

Non-breaking

@vchuravy
Copy link
Member

We did intentionally removed this functionality at some point during a refactor.

Would it make sense to move the GPUArraysTest instead into a package?

@christiangnrd
Copy link
Contributor Author

Would it make sense to move the GPUArraysTest instead into a package?

With the idea being that a separate package would be precompiled so loading the precompiled test suite for every test would introduce less overhead?

I think that would add a significant amount of friction for contributing to GPUArrays.

Maybe I de-emphasize it in the docs and make clear that init_code is much simpler and should be the default outside of large initialization code?

@christiangnrd
Copy link
Contributor Author

@giordano I've addressed your feedback. It should be more clear that this is only really meant for situations with long-running initialization code, and I fixed the test that initially didn't test anything

@vchuravy
Copy link
Member

vchuravy commented Feb 2, 2026

I think that would add a significant amount of friction for contributing to GPUArrays.

It would not need to be a seperate repository, and I don't even think we would need to register it.

@vchuravy vchuravy requested a review from maleadt February 2, 2026 14:06
Copy link
Collaborator

@maleadt maleadt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. One nit above.

@christiangnrd
Copy link
Contributor Author

Should I bump to 2.2 here or is it better as a separate commit/PR?

@maleadt
Copy link
Collaborator

maleadt commented Feb 4, 2026

You can bump here

@christiangnrd

This comment was marked as outdated.

@christiangnrd christiangnrd marked this pull request as draft February 4, 2026 17:16
@christiangnrd

This comment was marked as resolved.

@christiangnrd christiangnrd marked this pull request as ready for review February 4, 2026 23:11
@christiangnrd christiangnrd requested a review from maleadt February 4, 2026 23:11
@christiangnrd
Copy link
Contributor Author

Fixed up and added a note in the documentation

@maleadt maleadt merged commit bf1e35a into JuliaTesting:main Feb 6, 2026
22 checks passed
@christiangnrd christiangnrd deleted the initwrkr branch February 6, 2026 12:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants